<template>
  <div id="app">
    <h1>我是left组件</h1>
    {{"我是add，我的值是"+add}}
    <button @click="add++">+1</button>

  </div>
</template>

<script>
export default {
  data(){
    return{
      add:0
    }
  },
  deactivated(){
    console.log("俺呗缓存了")
  },activated(){
    console.log("我被激活了")
  }

}
</script>

<style scoped>
#app{
  width: 50%;
  height: 200px;
  background-color: rosybrown;
}

</style>